package com.neuedu.web.listener;

import javax.servlet.ServletRequestAttributeEvent;
import javax.servlet.ServletRequestAttributeListener;
import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionBindingEvent;

/**
 * @author 金山
 * 项目：javaweb
 * site: https://blog.fulfill.com.cn
 * 描述
 * @data 2024/11/1814:36
 */
// @WebListener
public class RequestAttributeListener implements ServletRequestAttributeListener {




    @Override
    public void attributeAdded(ServletRequestAttributeEvent scae) {
        System.out.println("RequestAttributeListener.attributeAdded");

        String key = scae.getName();
        Object value = scae.getValue();

        System.out.println("key = " + key);
        System.out.println("value = " + value);


    }

    @Override
    public void attributeReplaced(ServletRequestAttributeEvent scae) {
        System.out.println("RequestAttributeListener.attributeReplaced");
        String key = scae.getName();
        Object value = scae.getValue();

        System.out.println("key = " + key);
        System.out.println("value = " + value);
    }

    @Override
    public void attributeRemoved(ServletRequestAttributeEvent scae) {
        System.out.println("RequestAttributeListener.attributeRemoved");
        String key = scae.getName();
        Object value = scae.getValue();

        System.out.println("key = " + key);
        System.out.println("value = " + value);
    }


}




